﻿@{
    ViewBag.Title = "jqGrid in ASP.NET MVC - TreeGrid";

    var grid = new Lib.Web.Mvc.JQuery.JqGrid.JqGridHelper<jqGrid.Models.FileSystemInfoViewModel>("fileSystemInfos",
        expandColumn: "Name",
        dataType: Lib.Web.Mvc.JQuery.JqGrid.JqGridDataTypes.Json,
        methodType: Lib.Web.Mvc.JQuery.JqGrid.JqGridMethodTypes.Post,
        rowsNumber: -1,
        treeGridEnabled: true,
        treeGridModel: Lib.Web.Mvc.JQuery.JqGrid.JqGridTreeGridModels.Adjacency,
        url: Url.Action("FileSystemInfos")
    );
}

@grid.GetHtml()

@section JavaScript {
    <script type="text/javascript">
        $(document).ready(function () {
            @grid.GetJavaScript()
        });
    </script>
}